import 'react-quill/dist/quill.snow.css';
import React, { lazy, Suspense } from 'react';
import { PageLoading } from "@ecoding/components.antd.layout";

function dynamic(
    loadComponent: () => Promise<{
        default: React.ComponentType<any>;
    }>
) {
    const LazyComponent = lazy(loadComponent);
    return (props) => (
        <Suspense fallback={<PageLoading />}>
            <LazyComponent {...props} />
        </Suspense>
    );
}


const LazyQuill = dynamic(() => import(/* webpackChunkName: "quill" */ '@ecoding/components.quill'));

const C = () => {
    return <LazyQuill imgAction="https://f2e-api.sciecomm.cn/f2e/mock/up" style={{ height: '200px', display: "flex", flexDirection: "column" }} />;
}

export default C;

